<?php 
use Yii\helpers\Html;
use yii\bootstrap\Nav;


//菜单
$menuItem = [];
if ($access = Yii::$app->params['access']) {
	isset($access['USER']['ADMIN']) && $menuItem[] = ['label' => '管理员管理', 'url' => ['/user/admin']];
	isset($access['USER']['ROLE']) && $menuItem[] = ['label' => '角色管理', 'url' => ['/user/role']];
	isset($access['USER']['AUTH']) && $menuItem[] = ['label' => '权限管理', 'url' => ['/user/auth']];
	isset($access['USER']['TEMPORARYAUTH']) && $menuItem[] = ['label' => '临时授权', 'url' => ['/user/temporaryauth']];
} else {
    $menuItem = [
        ['label' => '管理员管理', 'url' => ['/user/admin']],
        ['label' => '角色管理', 'url' => ['/user/role']],
        ['label' => '权限管理', 'url' => ['/user/auth']],
		['label' => '临时授权', 'url' => ['/user/temporaryauth']],
    ];
}


echo Nav::widget([
	'options' => ['class' => 'nav nav-tabs mbm'],
	'items' => $menuItem,
]);

?>